const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  devServer: {
    proxy: {
      '/api': {
        target: 'http://localhost:8081', // 和后端端口一致
        changeOrigin: true,
        pathRewrite: { '^/api': '/api' }
      },
      '/uploads': {
        target: 'http://localhost:8081',
        changeOrigin: true
      },
      '/admin': {
        target: 'http://localhost:8081', // 后端服务地址
        changeOrigin: true
      }
    }
  }
})
